<?php
	foreach($data[0] as $row)
	{
		$tags = explode(", ", $row['Tag']);
		echo"<p class='verseright' style='padding-top:20px;'>";
		foreach ($tags as $key => $t) printf("<a href='/tagged/tag/?tag=%s'>%s</a></br>", $tags[$key],$tags[$key]);


		printf("</p>
		<div class='center' >
		<a href=/main/post/?post=%s><img id=\"shadow\"  src='http://heapstore.ru/storage/%s/%s'></img></a>
		</div>"
		,$row['Id'],$row['PageNumber'], $row['PhotoFilename']);

	}
	echo"</br><div class='paginator' id='paginator_example'></div>";
			printf("
				<script type='text/javascript'>
				paginator_example = new Paginator(\"paginator_example\", %s, 15, %s, \"\");
				</script>
			", $data[1]['NumOfPages'],  $data[1]['Step']);
	
?>
